<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp"%>
<%@ taglib prefix="sitemesh" uri="http://www.opensymphony.com/sitemesh/decorator" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0"/>
	<title>长春建筑学院云服务平台</title>
	<%@include file="/WEB-INF/views/modules/cms/front/include/head.jsp"%>
	<sitemesh:head/>
</head>
<script>
    function show_sub(v) {
			$("#officeIdId").val("")
        	$("#officeIdName").val("")
            if (v == '2'||v == '3'){
                $("#bumen").show();
            } else {
                $("#bumen").hide();
            }
    }
</script>
<body style="${bodyBackground eq 'w' ? 'background: #fff;' : 'background: #f8f8f8;'}">
<div class="modal loginModal">
	<!--弹窗内容-->
	<div class="modal_content">
		<!--弹窗中间内容-->
		<div class="modal_body">
			<h2>用户登陆<span class="closebtn loginclose">&times;</span></h2>
			<div class="input_group">
				<label>用户名:</label>
				<input type="text" placeholder="用户名" class="inputext" id="username" name="username" value="${username}"
					   onblur="ValidateUtil.checkInputNull('username', '用户名')"/>
				<div class="clear"></div>
				<span id="usernameError" class="errorts"> </span>
			</div>
			<div class="input_group">
				<label>密码:</label>
				<input type="password" placeholder="密码" class="inputext" id="password" name="password"
					   onblur="ValidateUtil.checkInputNull('password', '密码')"/>
				<div class="clear"></div>
				<span id="passwordError" class="errorts"> </span>
			</div>
			<div class="clear"></div>
			<div class="pwdpra"><input type="checkbox" id="rememberMe" name="rememberMe" ${rememberMe ? 'checked' : ''} class="jzpwd fl"> <i>记住密码</i><%--<a href="#" class="fr">忘记密码？</a>--%></div>
			<div class="clear"></div>
			<input type="button" value="登陆" class="btn loginbtn" onclick="login('${ctxAdmin}/login', '${ctxAdmin}/sys/user/info?origin=front')"/>
		</div>
	</div>
</div>
<div class="modal regisModal">
	<!--弹窗内容-->
	<div class="modal_content regis_content">
		<!--弹窗中间内容-->
		<div class="modal_body">
			<h2>用户注册<span class="closebtn regisclose">&times;</span></h2>
			<div class="input_group">
				<label>姓名:</label>
				<input type="text" placeholder="姓名" class="inputext"id="name" name="name" onblur="ValidateUtil.checkInputNull('name','姓名')" />
				<div class="clear"></div>
				<span id="nameError" class="errorts"> </span>
			</div>
			<div class="input_group">
				<label>身份证号:</label>
				<input type="text" placeholder="身份证号 / 登陆名" class="inputext" id="loginName" name="loginName"  onblur="ValidateUtil.checkIdCard('loginName')"/>
				<div class="clear"></div>
				<span id="loginNameError" class="errorts"> </span>
			</div>
			<div class="input_group">
				<label>密码:</label>
				<input type="password" placeholder="密码" class="inputext" id="pwd" name="pwd"   onblur="ValidateUtil.checkPwd('pwd')"/>
				<div class="clear"></div>
				<span id="pwdError" class="errorts"> </span>
			</div>
			<div class="input_group">
				<label>确认密码:</label>
				<input type="password" placeholder="确认密码" class="inputext" id="newpwd" name="`"  onblur="ValidateUtil.checkAgainPwd('pwd','newpwd')"/>
				<div class="clear"></div>
				<span id="newpwdError" class="errorts"> </span>
			</div>
			<div class="input_group">
				<label>邮箱:</label>
				<input type="text" placeholder="邮箱" class="inputext" id="email" name="email"  onblur="ValidateUtil.checkEmail('email')"/>
				<div class="clear"></div>
				<span id="emailError" class="errorts"> </span>
			</div>
			<div class="input_group">
				<label>手机号码:</label>
				<input type="text" placeholder="手机" class="inputext" id="phone" name="phone"  onblur="ValidateUtil.checkPhone('phone')"/>
				<div class="clear"></div>
				<span id="phoneError" class="errorts"> </span>
			</div>
			<div class="input_group">
				<label>用户类型:</label>
				<select class="inputext" id="type" name="type" onchange="show_sub(this.options[this.options.selectedIndex].value)"
						<%--onblur="ValidateUtil.checkType('type','officeIdId','office')">--%>
						onblur="ValidateUtil.checkSelectNull('type','用户类型')">
					<option value="">请选择</option>
					<option value="2">教师</option>
					<option value="3">学生</option>
					<option value="4">校外人员</option>
				</select>
				<div class="clear"></div>
				<span id="typeError" class="errorts"> </span>
			</div>
			<div class="input_group" id="bumen" hidden="true">
				<label>所属部门：</label>
				<sys:treeselect id="officeId" name="officeId" value="" labelName="officeName" labelValue=""
								title="部门" url="/sys/office/front/treeData?type=2" extId="200" isAll="true"
								cssClass="inputext" allowClear="true" hideBtn="true" validate="true"/>
				<div class="clear"></div>
				<span id="officeError" class="errorts"> </span>
			</div>
			<input type="button" value="注册" class="btn loginbtn" onclick="register('${ctx}/register','${ctx}/index-1${fns:getUrlSuffix()}')"/>
		</div>
	</div>
</div>
<!--头部-->
<div class="header">
	<div class="wrap">
		<div class="logo">长春建筑学院云服务平台</div>
		<div class="nav">
			<ul>
				<li class="${not empty isIndex && isIndex ? 'on' : ''}"><a href="${ctx}/index-1${fns:getUrlSuffix()}">首页</a></li>
				<c:forEach items="${fnc:getMainNavList(site.id)}" var="category" varStatus="status">
					<c:if test="${status.index lt 6}">
						<c:set var="menuCategoryId" value=",${category.id},"/>
						<li class="${requestScope.category.id eq category.id ? 'on' : ''}"><a href="${category.url}" target="${category.target}"><span>${category.name}</span></a></li>
					</c:if>
				</c:forEach>
				<%--<li>
					<c:if test="${not empty principal}">
						<c:if test="${principal.id ne '1'}">
							<c:forEach items="${fns:getNavMenuList()}" var="menu">
								<li class="${requestScope.menu.id eq menu.id ? 'on' : ''}"><a href="${menu.href}" target=""><span>${menu.name}</span></a></li>
							</c:forEach>
						</c:if>
					</c:if>
				</li>--%>
			</ul>
		</div>
		<c:set var="principal" value="${fns:getPrincipal()}"/>
		<c:if test="${empty principal}">
			<div class="lore">
				<i id="loginbtn">登陆</i> &nbsp;| &nbsp;<i id="regisbtn">注册</i>
			</div>
		</c:if>
		<c:if test="${not empty principal}">
			<div class="person_center">
				<%--<li class="${requestScope.menu.id eq percenter.id ? 'on' : ''}">--%>
					<a href="${ctxAdmin}/sys/user/info?origin=front" target="_self"><img src="${ctxStatic}/front/images/person.png"><i>个人中心</i></a>
				<%--</li>--%>
				<a href="/${fns:getConfig('redis.keyPrefix')}/a/logout"><i> &nbsp;|&nbsp; 退出</i></a>
					<c:if test="${principal.id eq '1'}">
						<a href="${pageContext.request.contextPath}/admin/login"><i>&nbsp;| &nbsp;后台登录</i></a>
					</c:if>
			</div>
		</c:if>
	</div>
</div>
<div class="clear"></div>
<!--banner-->
<div class="my-slider">
	<ul>
		<li>
			<div> <a href="#"  target="_blank" ><img src="${ctxStatic}/front/images/banner.png" alt=""/></a></div>
		</li>
		<li>
			<div> <a href="#"  target="_blank" ><img src="${ctxStatic}/front/images/banner.png" alt=""/></a></div>
		</li>
		<li>
			<div> <a href="#"  target="_blank" ><img src="${ctxStatic}/front/images/banner.png" alt=""/></a></div>
		</li>
	</ul>
</div>
<div class="clear"></div>
<div><sitemesh:body/></div>
<div class="clear"></div>
<div class="footer">
	<img src="${ctxStatic}/front/images/img.png">
	<p>Copyright © 2013-2019 长春建筑学院. All Rights Reserved. </p>
</div>
</body>
</html>
